using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class WarehouseDTO : INotifyPropertyChanged
    {
        private String _ContactPerson;
        private String _KodeWarehouse;
        private int _No;
        private decimal _Qty;
        private decimal _Sheet;
        private String _Telp;
        private String _WarehouseName;
        private String _created_by;
        private DateTime? _created_date;
        private String _modified_by;
        private DateTime? _modified_date;
        private decimal _Lebar;
        private decimal _Panjang;
        private string _KodePallet;
        private string _EmailFolder;
        private bool _isSelected;

        [DataMember]
        public String KodeWarehouse
        {
            get { return _KodeWarehouse; }
            set
            {
                _KodeWarehouse = value;
                RaisePropertyChanged("KodeWarehouse");
            }
        }

        [DataMember]
        public String WarehouseName
        {
            get { return _WarehouseName; }
            set
            {
                _WarehouseName = value;
                RaisePropertyChanged("WarehouseName");
            }
        }

        [DataMember]
        public String EmailFolder
        {
            get { return _EmailFolder; }
            set
            {
                _EmailFolder = value;
                RaisePropertyChanged("EmailFolder");
            }
        }


        [DataMember]
        public String Telp
        {
            get { return _Telp; }
            set
            {
                _Telp = value;
                RaisePropertyChanged("Telp");
            }
        }


        [DataMember]
        public String ContactPerson
        {
            get { return _ContactPerson; }
            set
            {
                _ContactPerson = value;
                RaisePropertyChanged("ContactPerson");
            }
        }


        [DataMember]
        public String created_by
        {
            get { return _created_by; }
            set
            {
                _created_by = value;
                RaisePropertyChanged("created_by");
            }
        }


        [DataMember]
        public DateTime? created_date
        {
            get { return _created_date; }
            set
            {
                _created_date = value;
                RaisePropertyChanged("created_date");
            }
        }

        [DataMember]
        public String modified_by
        {
            get { return _modified_by; }
            set
            {
                _modified_by = value;
                RaisePropertyChanged("modified_by");
            }
        }


        [DataMember]
        public DateTime? modified_date
        {
            get { return _modified_date; }
            set
            {
                _modified_date = value;
                RaisePropertyChanged("modified_date");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }


        [DataMember]
        public decimal Qty
        {
            get { return _Qty; }
            set
            {
                _Qty = value;
                RaisePropertyChanged("Qty");
            }
        }

         [DataMember]
        public decimal Sheet
        {
            get { return _Sheet; }
            set
            {
                _Sheet = value;
                RaisePropertyChanged("Sheet");
            }
        }

         [DataMember]
         public decimal Panjang
         {
             get { return _Panjang; }
             set
             {
                 _Panjang = value;
                 RaisePropertyChanged("Panjang");
             }
         }

         [DataMember]
         public decimal Lebar
         {
             get { return _Lebar; }
             set
             {
                 _Lebar = value;
                 RaisePropertyChanged("Lebar");
             }
         }

         [DataMember]
         public string KodePallet
         {
             get { return _KodePallet; }
             set
             {
                 _KodePallet = value;
                 RaisePropertyChanged("KodePallet");
             }
         }

         public bool IsSelected
         {
             get { return _isSelected; }
             set
             {
                 _isSelected = value;
                 RaisePropertyChanged("IsSelected");
             }
         }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}